@extends('../manage.layout')
@section('content')
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            联系我们管理
            <small>联系我们列表</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="/manage"><i class="fa fa-dashboard"></i>首页</a></li>
            <li class="active">联系我们列表</li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content animated fadeInRight">
        <div class="row">
            <div class="col-md-12">
                <!-- general form elements -->
                <div class="box-body table-responsive no-padding">
                    <div class="box box-primary">
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form method="post" action="/manage/contact/update/{{ $contact->id}}" style="max-width: 1200px">
                            {{--{{ method_field('PUT') }}--}}
                            {{ csrf_field() }}
                            <div class="box-body">
                                <input type="hidden" name="user_id" value="{{ session('user.id') }}">
                                <div class="form-group">
                                    <label for="title">标题</label>
                                    <input type="text" class="form-control" name="title" id="title" value="{{ $contact->title }}" required="required" placeholder="请输入标题">
                                </div>
                                <div class="form-group">
                                    <label for="rank">权重</label>
                                    <input type="number" class="form-control" id="rank" name="rank" value="{{ $contact->rank }}" min="0">
                                </div>
                                <div class="form-group">
                                    <label for="keywords">关键词</label>
                                    <input type="text" class="form-control" id="keywords" name="keywords" value="{{ $contact->keywords }}"  placeholder="请输入关键词">
                                </div>
                                <div class="form-group">
                                    <label for="description">描述</label>
                                    <textarea class="form-control" id="description" name="description" placeholder="请输入描述">{{ $contact->description }}</textarea>
                                </div>
                                <div class="form-group">
                                    <label for="content">模块内容</label>
                                    <script id="content" name="content" type="text/plain">
                                        {!! $contact->content !!}
                                    </script>
                                </div>
                            </div>
                            <!-- /.box-body -->
                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">确定</button>&nbsp;&nbsp;<span class="btn btn-primary" onclick="window.location.href='/manage/contact'">返回</span>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- /.content -->
@endsection
@section('script')
    <!-- ueditor -->
    <script src="/plugin/UEditor-1.4.3.3/ueditor.config.js"></script>
    <script src="/plugin/UEditor-1.4.3.3/ueditor.all.js"></script>
    <script type="text/javascript">
        var ue = UE.getEditor('content');
    </script>
@endsection